test: test_pa_out.o
	xterm -e ./test_pa_out.o

test_pa_out.o: test_pa_out.ml test.cmo
	ocamlfind ocamlc -package curses -warn-error A -I . test.cmo test_pa_out.ml -o test_pa_out.o -linkpkg

test.cmo: test.ml
	ocamlfind ocamlc -package curses -warn-error A -I . -c test.ml


#test_pa.cmo: test_pa.ml pa_tui.cmo
#	ocamlfind ocamlc  -c -pp "camlp4o -I `ocamlfind query type-conv` pa_type_conv.cmo pa_tui.cmo " test.cmo test_pa.ml

test_pa_out.ml: test_pa.ml pa_tui.cmo
	camlp4o -I `ocamlfind query type-conv` pa_type_conv.cmo pa_tui.cmo test_pa.ml -o test_pa_out.ml

pa_tui.cmo: pa_tui.ml
	ocamlfind ocamlc -package type-conv -c -pp "camlp4orf " -I +camlp4 pa_tui.ml


.PHONY: test
